<nz-drawer
        (nzOnClose)="close()"
        [nzBodyStyle]="{ overflow: 'auto' }"
        [nzFooter]="footerTpl"
        [nzMaskClosable]="false"
        [nzTitle]="(editDemoType$ | async) === 'edit' ? '编辑':'创建'"
        [nzVisible]="visible"
        [nzWidth]="600"
>
  <form (keyup.control.enter)="submit()" *nzDrawerContent [formGroup]="validateForm" ngxsForm="demo.editForm"
        nz-form>

    <nz-form-item>
      <nz-form-label nzFor="name" nzSpan="3">名称</nz-form-label>
      <nz-form-control nzSpan="17">
        <input formControlName="name" id="name" nz-input/>
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label nzFor="url" nzSpan="3">URL</nz-form-label>
      <nz-form-control nzSpan="17">
        <input formControlName="url" id="url" nz-input/>
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label nzFor="git" nzSpan="3">Git地址</nz-form-label>
      <nz-form-control nzSpan="17">
        <input formControlName="git" id="git" nz-input/>
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label nzFor="description" nzSpan="3">简介</nz-form-label>
      <nz-form-control nzSpan="17">
        <textarea [nzAutosize]="{ minRows: 4, maxRows: 20 }" formControlName="description" id="description"
                  nz-input></textarea>
      </nz-form-control>
    </nz-form-item>

  </form>

  <ng-template #footerTpl>
    <div style="float: right">
      <button (click)="close()" nz-button style="margin-right: 8px;">取消</button>
      <button (click)="submit()" nz-button nzType="primary">提交</button>
    </div>
  </ng-template>
</nz-drawer>
